package com.heima.feign;

import com.heima.common.dtos.ResponseResult;
import com.heima.dto.AdComment;
import com.heima.dto.ApAuthor;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.article.dtos.AuthorDto;
import com.heima.model.comment.dtos.CommentPageQueryDTO;
import com.heima.model.media.dtos.WmNewsResultDTO;
import com.heima.model.review.CommentRepaySaveDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "leadnews-review")
public interface CommentFeignClient {

    /*
     * 根据评论id删除评论
     */
    @DeleteMapping("/api/v1/comment/del_comment/{commentId}")
    public ResponseResult delComment(@PathVariable("commentId") Long commentId);
    /*
     * 根据回复id删除回复
     */
    @DeleteMapping("/api/v1/comment/del_comment_repay/{commentRepayId}")
    public ResponseResult delCommentRepay(@PathVariable("commentRepayId") Long replyId);


    /**
     * 评论和回复查询所有
     *
     * @param dto
     * @return
     */
    @PostMapping(" /api/v1/comment/manage/list")
    public ResponseResult manageList(@RequestBody CommentPageQueryDTO dto);



    /**
     * 作者回复评论
     *
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/comment/manage/comment_repay")
    public ResponseResult commentRepay(@RequestBody CommentRepaySaveDto dto);

    /**
     * 根据文章id删除评论
     * @param articleId
     */
    @DeleteMapping("/api/v1/comment/del_comment/{articleId}")
    public void delCommentByArtilceId(@PathVariable("articleId") Long articleId);

}
